using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Playables;

namespace Pvp.Timeline
{
    [System.Serializable]
    public class RoleTransformAsset : BaseRolePlayableAsset<RoleTransformBehaviour>
    {
        [SerializeField]
        private bool enableX;
        [SerializeField]
        private bool enableY;
        [SerializeField]
        private AnimationCurve curveX;
        [SerializeField]
        private AnimationCurve curveY;

        protected override void OnBehaviourInit(RoleTransformBehaviour behaviour)
        {                 
            if (enableX)
            {
                behaviour.xMovementLine = FPLibrary.FPPolyline.ToFPPolyline(curveX);
            }
            if (enableY)
            {
                behaviour.zMovementLine = FPLibrary.FPPolyline.ToFPPolyline(curveY);
            }
        }
    }
}

